Skip to content

feat: persist PTY output activity evidence - #5

Open
schickling-assistant wants to merge 3 commits into
mainfrom
schickling-assistant/2026-08-26-session-activity-stamp
Open

feat: persist PTY output activity evidence#5
schickling-assistant wants to merge 3 commits into
mainfrom
schickling-assistant/2026-08-26-session-activity-stamp

Conversation

@schickling-assistant

Copy link
Copy Markdown
Contributor

Problem

pty-rust is the Rust implementation of the same PTY session/registry contract as compoundingtech/pty. Node PTY #168 adds launcher-agnostic lastOutputAtMs; without parity, st2 session-fidelity observation depends on which PTY backend owns the session.

Goal

Persist the newest PTY output timestamp with the same camelCase metadata field, bounded live write rate, and retained-exit guarantee as PTY #168.

Decisions

  • Stamp nonempty DaemonMsg::PtyData in the existing single-threaded actor; no second observer.
  • Use actor-owned last_output_at_ms and recv_timeout for a trailing one-second persist deadline.
  • Persist through the existing atomic metadata replacement; retained exit writes the final in-memory stamp in the exit mutation.
  • Optional lastOutputAtMs is evidence only. pty-rust does not classify active/idle or know any launcher/harness.
  • Create the repository's initial VRS hierarchy (docs/vrs/{requirements,spec}.md) with explicit user authorization.

Verification

  • cargo check — green with Nix Rust + required Zig 0.15.2.
  • cargo test --test cli_e2e --test registry_liveness16/16 green.
  • Real-daemon proofs: absent before output, recent/advancing stamp across bursts, immediate output+exit retains the final stamp.
  • axe vrs check --profile strict docs/vrs — green.

Build invocation used the documented generated-dependency checkout bypass because libghostty's build script checks out Ghostty inside Cargo target/ and the megarepo wrapper otherwise mistakes it for a canonical branch mutation:

MEGAREPO_ALLOW_CANONICAL_MUTATION=1 \
  nix shell nixpkgs#cargo nixpkgs#rustc nixpkgs#zig_0_15 -c cargo test ...

Complexity

Two actor fields (Option<u64>, Option<Instant>), one recv_timeout branch, one additive metadata field. No process, stream, writer thread, or per-chunk filesystem operation.

Concerns

The repository has no native devshell/CI. Building libghostty requires Zig 0.15.2 exactly; nixpkgs zig currently resolves to 0.16 and fails, while zig_0_15 is correct.

Friction & bottlenecks

  • No repository-native Nix/CI/toolchain bootstrap.
  • libghostty build checkout triggers the canonical-worktree policy unless the generated dependency checkout is explicitly authorized.
  • Rustfmt over the whole repository creates large baseline churn; only semantic hunks were retained.

Follow-ups

  • Keep the PTY Node/Rust compatibility matrix and VRS aligned as storage fields evolve.

References

Posted on behalf of @schickling
field value
agent_identity unknown
agent_persona generalist
agent_supervisor unavailable
agent_tool OMP
agent_tool_version 18.0.3
agent_runtime OMP 18.0.3
tooling_profile dotfiles@e4789b0

Mirror compoundingtech/pty#168 in the Rust actor: stamp nonempty
PtyData in memory, persist the newest unix-ms value on a trailing
one-second deadline, and carry the final stamp into retained exit
metadata. No per-chunk filesystem work or activity classification.

Includes the user-confirmed initial VRS hierarchy defining compatibility,
actor ownership, durability, write bounds, and executable evidence.

agent-identity: unknown
agent-persona: generalist
agent-supervisor: unavailable
agent-tool: OMP
agent-tool-version: 18.0.3
agent-runtime: OMP 18.0.3
tooling-profile: dotfiles@e4789b0
@schickling-assistant schickling-assistant added the enhancement New feature or request label Aug 26, 2026
@schickling-assistant
schickling-assistant marked this pull request as ready for review August 26, 2026 17:18
agent-identity: unknown
agent-persona: generalist
agent-supervisor: unavailable
agent-tool: OMP
agent-tool-version: 18.0.3
agent-runtime: OMP 18.0.3
tooling-profile: dotfiles@e4789b0
agent-identity: unknown
agent-persona: generalist
agent-supervisor: unavailable
agent-tool: OMP
agent-tool-version: 18.0.3
agent-runtime: OMP 18.0.3
tooling-profile: dotfiles@e4789b0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant